package com.bdqn.oa.dao;

import com.bdqn.oa.entity.Role;
import com.bdqn.oa.utils.Page;

import java.sql.SQLException;
import java.util.List;

/**
 * @author zhowei
 * @date 2022/7/20 18:09
 */
public interface RoleDao {
    /**
     * 新增权限
     * @param role
     * @return
     */
    int insertRole(Role role) throws SQLException;

    /**
     * 更改权限状态
     * @param role
     * @return
     */
    public int updateRoleState(Role role) throws SQLException;

    /**
     * 查看所有权限信息
     * @return
     */
    List<Role> getRoleByList() throws SQLException;

    /**
     * 查看所有权限的分页信息
     * @return
     */
    Page<Role> getRoleByPage(long pageNumber,long pageSize) throws SQLException;

    /**
     * 删除权限
     * @return
     * @throws SQLException
     */
    int deleteRole(Role role)throws SQLException;


}
